<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //console.log(Math.random()*45);

    // function getRandomIntInclusive(min,max){
    //     const minCeiled = Math.ceil();
    //     const maxCeiled = Math.ceil();
    // }

    let arr = ['a','c','e'];
    let array = new Array('a','f','ed','dgfg');
    //arr[0];   //0~arr.length-1
    let RanIndex = Math.floor(Math.random()*(arr.length));
    console.log(arr[RanIndex]);
    //随机点名，点过的名字不重复点，如果全部点完名推出的点名并提示用户


    //猜数字，猜中交作业
    let num;
    function cai(min,max){
        return Math.floor(Math.random()*(max-min)+1);
    }
    let boom = cai(1,10);
    while(true){
        num = prompt('输入你猜的数字');
        if(num === boom){
            alert('恭喜喜提作业');
            break;
        }else if (num > boom){
            alert('你猜大了');
            break;
        }else if(num < boom){
            alert('你猜小了');
            break;
        }
    }

</script>
</html>